<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
@include("layouts.common.head")
<!-- Fonts -->
    <link href="{{ asset('static/css/company/common.css') }}" rel="stylesheet">
    <link href="{{ asset('static/css/company/company_resumes.css') }}?v=<?php time()?>" rel="stylesheet">
    <!-- Styles -->
    <style>
        html {
            overflow-y: scroll;
        }
    </style>
</head>
<body>
<div id="app">
    @include("layouts.nav")
    @include("company.resume.other_top_nav")
    <div class="user_main">
        <div class="mleft">
            <div class="left_jobs">
                <div class="li link_gray6 J_hoverbut t5 select" onclick="window.location='{{url('company/resume')}}'">
                    收到的简历
                </div>
                <div class="li link_gray6 J_hoverbut t6" onclick="window.location='{{url('resume/interview')}}'">面试邀请
                </div>
                {{--<div class="li link_gray6 J_hoverbut t8" onclick="window.location='{{url('resume/favorites')}}'">收藏的简历--}}
                {{--</div>--}}
                {{--<div class="li link_gray6 J_hoverbut t9" onclick="window.location='{{url('resume/log')}}'">浏览过的简历</div>--}}

            </div>
        </div>
        <div class="mright">
            <div class="user_pagetitle">
                <div class="pat_l">收到的简历</div>
                <div class="pat_r">系统保留三个月的记录</div>
                <div class="clear"></div>
            </div>
            <div class="user_tab">
                <a href="{{url('company/resume/1')}}" class="tabli @if($status == 1) select @endif">待处理简历</a>
                <a href="{{url('company/resume/2')}}" class="tabli @if($status == 2) select @endif">已处理简历</a>
                <div class="clear"></div>
                <div class="btnbox resume_list">
                    <form id="ajax_search_location" action="" method="get">
                        <input name="key" id="key" type="text" class="input_245_34" placeholder="请输入职位名称"
                               value="@if(isSet($params['key'])){{$params['key']}}@endif">
                        <!--<input type="text" name="key" class="soinput" placeholder="请输入关键字" />-->
                        <div class="btn_yellow J_hoverbut btn_inline btnSearch" style="padding: 7px 15px;">搜人才</div>
                    </form>
                </div>
            </div>

            <div class="resume_receive_th">
                <div class="th1">姓名</div>
                <div class="th3">基本信息</div>
                <div class="th4">应聘职位</div>
                <div class="th5">应聘时间</div>
                <div class="th5">操作</div>
                <div class="clear"></div>
            </div>
            <form id="form1" action="" method="post" class="J_allListBox">
                @if($list)
                    @foreach($list as $item)
                        <div class="resume_receive">
                            <div class="td1 link_blue l13">
                                <a target="_blank" class="link_blue" href="{{url('/resume/info',[$item->id])}}">{{$item->nickname}}</a>
                                <div class="clear"></div>
                            </div>
                            <div class="td3">
                                {{$item->birth_cn}}/{{$item->sex_cn}}/{{$item->education_cn?$item->education_cn:"保密"}}
                                /{{$item->experience_cn?$item->experience_cn:'保密'}}
                            </div>
                            <div class="td4 link_blue substring">
                                <a target="_blank" href="{{url('/job/info',[$item->job_id])}}">{{$item->jobs_name}}</a>
                            </div>
                            <div class="td5">{{date("Y-m-d",$item->create_time)}}</div>

                            <div class="td5 link_blue">
                                @if($status == 1)
                                    <a class="J_interview resume_status" href="javascript:;" data-id="{{$item->id}}"
                                       data-status="3">面试要请</a>
                                    <a class="favorite had resume_status" href="javascript:;" data-id="{{$item->id}}"
                                       data-status="4">职位不符</a>
                                @else
                                    {{($item->status == 3)?"已邀请":"已拒绝"}}
                                @endif
                            </div>

                            <div class="clear"></div>
                        </div>
                    @endforeach

                    {{--<div class="resume_but">--}}
                    {{--<div class="td1"><input class="J_allSelected" type="checkbox" value=""/></div>--}}
                    {{--<div class="td2">--}}
                    {{--<div class="btn_lightgray J_hoverbut btn_inline" id="deleteall">删除</div>--}}
                    {{--</div>--}}
                    {{--<div class="clear"></div>--}}
                    {{--</div>--}}
                    <div class="qspage">{{$list->links()}}</div>
                @else
                    <div class="res_empty link_blue">
                        收到的简历不够多？不如主动出击找人才！<br/>
                        海量优质简历任您选，快速招人不再难。立即 <a href="{{url('')}}" target="_blank">搜人才</a>
                    </div>
                @endif
            </form>
        </div>
    </div>
</div>
<script type="text/javascript" src="{{asset('static/js/jquery.disappear.tooltip.js')}}"></script>
<script>

    $(".resume_status").click(function () {
        var id = $(this).data('id');
        var status = $(this).data('status');
        $.ajax({
            url: "{{url('resume/status')}}",
            type: 'POST',
            dataType: 'json',
            data: {
                id: id,
                status: status,
            }
        }).done(function (data) {
            disapperTooltip('success', "成功");
            setTimeout(function () {
                window.location.reload();
            }, 1000);

        }).fail(function (result) {
            disapperTooltip("remind", result.msg);
        });
    })
    $('.btnSearch').click(function () {
        $('#ajax_search_location').submit();
    });
</script>
</body>
</html>
